/*
 *	This file is part of Lounge-Cast.
 *
 *  Author:  	Markus Moormann
 *	E-mail:  	mmoorman@uni-osnabrueck.de
 *	Copyright:	University of Osnabrueck (Zentrum Virtuos)
 * 	Website:	www.uni-osnabrueck.de
 *	Date:		16.02.2011
 *
 *	Lounge-Cast is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *	Lounge-Cast is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with Lounge-Cast.  If not, see <http://www.gnu.org/licenses/>.
 */
package multimedia.model
{
	import com.adobe.cairngorm.control.CairngormEvent;
	
	import multimedia.model.vo.PlaylistVO;
	import multimedia.model.vo.UserVO;
	
	import mx.collections.ArrayCollection;
	import mx.controls.SWFLoader;
	
	import org.osmf.samples.MediaContainerUIComponent;

	[Bindable]

	public class ModelLocator
	{
		private static var instance:ModelLocator;

		public static function getInstance():ModelLocator
		{
			if (instance == null)
				instance = new ModelLocator();
			return instance;
		}

		public function ModelLocator()
		{
			if (instance != null)
			{
				throw new Error("ModelLocator. Only one ModelLocator instance should be instantiated");
			}
		}

		public static var monthNames:Array = [	"Januar",
												"Februar",
												"März",
												"April",
												"Mai",
												"Juni",
												"Juli",
												"August",
												"September",
												"Oktober",
												"November",
												"Dezember"]

		public static var mediaNames:Object = {video: "Video", 
										  slide: "Präsentation", 
										  text: "Text", 
										  image: "Bilder"};
		public static var roleNames:Object = {editor: "Redakteur",
											  rootEditor: "Chef-Redakteur",
											  usermanagement: "Benutzerverwaltung",
											  author: "Autor"};

		/**
		 * properties from properties.xml
		 */
		public var webserviceURL:String;
		public var apiKey:String;

		public var approvedMedia:Array;
		public var nonApprovedMedia:Array;
		public var expiredMedia:Array;
		public var userMedia:ArrayCollection;
		/**
		 * playlists for playlistComponent
		 */
		public var currentEditPlaylist:PlaylistVO;
		public var playlists:ArrayCollection;
		public var player:ArrayCollection;
		public var playlistsForPlayer:ArrayCollection;
		/**
		 * feed
		 */
		public var feeds:ArrayCollection;
		public var approvedFeedItems:ArrayCollection;
		public var nonApprovedFeedItems:ArrayCollection;

		/**
		 * user
		 */
		public var user:Array;
		public var userGroups:ArrayCollection;
		public var uploadedFiles:ArrayCollection;
		public var userFormUser:UserVO;

		/**
		 * validation
		 */
		public var formIsValid:Boolean = false;
		public var mediaFormIsValid:Boolean = false;
		public var mediaContentFormIsValid:Boolean = false;

		/**
		 * preview stuff
		 */
		public var wrapper:MediaContainerUIComponent;
		public var numberOfSlides:int;
		public var currentSlide:int;

		public var playerState:String = "";
		public var nextEvent:CairngormEvent;
		public var previewBackgroundColor:uint = 0;
		
		public var mediaState:String = "video";
		
		/**
		 * categories
		 */
		public var categories:ArrayCollection = new ArrayCollection();
		

	}
}
